Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Config #399

Merged
merged 2 commits into from
Apr 29, 2024
Merged

Runtime Config #399

merged 2 commits into from
Apr 29, 2024

Conversation

Taepper
Copy link
Collaborator

@Taepper Taepper commented Apr 25, 2024

feat: tidying up CLI and file configuration for runtime config. Added option for specifying the port

Summary

The port on which SILO listens to requests should be able to be specified.

Furthermore, I edited the way the configs are parsed such that there is a default RuntimeConfig (default constructor), which has 2 member functions for overwriting its values from 1. the config file and 2. the CLI arguments

PR Checklist

  • All necessary documentation has been adapted or there is an issue to do so.
  • The implemented feature is covered by an appropriate test.

@Taepper Taepper changed the title feat: tidying up CLI and file configuration for runtime config. Added option for specifying the port Runtime Config Apr 25, 2024
@Taepper Taepper requested a review from pflanze April 25, 2024 14:19
Copy link
Contributor

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also document somewhere (in the README) that the runtime config exists? I just noticed that this is not mentioned there.

@Taepper
Copy link
Collaborator Author

Taepper commented Apr 25, 2024

Maybe we should also document somewhere (in the README) that the runtime config exists? I just noticed that this is not mentioned there.

Yes, I will do so! What is with the StartUp Config. Would you have any objections if I merge all the information from that into the RuntimeConfig? (as both are only used in the case of --api)

@Taepper
Copy link
Collaborator Author

Taepper commented Apr 25, 2024

Then we have one config for --api and one config for --preprocessing. I would also change the way the preprocessing config currently works, to be consistent with this. Therefore, we consistently have

default configuration values < config file < CLI arguments

Cornelius and Christian both mentioned that environment variables should be added to those lists. Do you object to have that between config and CLI for the final precendences:

default configuration values < config file < environment variables < CLI arguments

@pflanze
Copy link
Contributor

pflanze commented Apr 25, 2024

Commit 7052329 works for me, and the code looked good to me. Documentation will be good. I don't think it needs any tests at this time in the project's history since the CI and my test runner will exercise the important options already. (Feel free to argument differently, I may be missing some context.)

Copy link
Contributor

@pflanze pflanze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and works for SILO_PORT.

@Taepper Taepper merged commit 33bdd65 into main Apr 29, 2024
8 checks passed
@Taepper Taepper deleted the port-option branch April 29, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants